#pragma once
#ifdef DEEPLEARNING_EXPORTS
#define DLL_API __declspec(dllexport)
#else
#define DLL_API __declspec(dllimport)
#endif

#include "opencv2/opencv.hpp"

#include <QWidget>

struct DetectResult 
{
	int classes;
	float score;
	cv::Rect box;
};



class SegObject
{
public:
	virtual ~SegObject() {};
	virtual void Release() = 0;
	virtual int Evaluate(cv::Mat srcImg, cv::Mat& mask) = 0;
};

DLL_API SegObject* CreateSegObj(QString model_dir);
DLL_API void DestroypSegObj(SegObject* pExport);


class DetObject
{
public:
	virtual ~DetObject() {};
	virtual void Release() = 0;
	virtual int Evaluate(cv::Mat srcImg, std::vector<DetectResult>& results) = 0;
	virtual void setStride(float stride) = 0;
	virtual void setScore(float score) = 0;
	virtual void setNms(float nms) = 0;
};

DLL_API DetObject* CreateDetObj(QString model_dir);
DLL_API void DestroypDetObj(DetObject* pExport);



class ClsObject
{
public:
	virtual ~ClsObject() {};
	virtual void Release() = 0;
	virtual int Evaluate(std::vector<cv::Mat> srcImg, std::vector<int>& rstClassList, std::vector<float>& rstProbList) = 0;
};

DLL_API ClsObject* CreateClsObj(QString model_dir);
DLL_API void DestroypClsObj(ClsObject* pExport);